<template>
  <div>
    <el-dialog
      v-model="viewDetails"
      width="60%"
      top="50vh"
      class="el-overlay1"
      :close-on-click-modal="false"
    >
      <el-table
        :data="ruleDetailList"
        border
        class="table"
        ref="multipleTable"
        header-cell-class-name="table-header"
      >
        <el-table-column prop="title" label="规则">
          <template #default="scope">
            {{ scope.row.ruleType == 1 ? "周" : "月" }}
          </template>
        </el-table-column>
        <el-table-column prop="weekSet" label="范围">
          <template #default="scope">
            <div v-if="scope.row.ruleType == 2">
              {{ scope.row.dateStart + "至" + scope.row.dateStop }}
            </div>
            <div class="weekset" v-else>
              <div v-for="(item1, index) in scope.row.weekSet" :key="index">
                <span v-if="item1 == 0">周日,</span>
                <span v-if="item1 == 1">周一,</span>
                <span v-if="item1 == 2">周二,</span>
                <span v-if="item1 == 3">周三,</span>
                <span v-if="item1 == 4">周四,</span>
                <span v-if="item1 == 5">周五,</span>
                <span v-if="item1 == 6">周六,</span>
              </div>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="optionTime" label="时间"></el-table-column>
        <el-table-column prop="optionType" label="动作">
          <template #default="scope">
            {{ scope.row.optionType == 0 ? "断开" : "送电" }}
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>
<script>
export default {
  components: {},
  setup() {
      
  },
};
</script>
<style lang="less" scoped>
@import "../assets/css/common.less";
</style>